package com.young.common.model;

import lombok.Getter;

/**
 * 返回值和返回信息
 */
@Getter
public enum ResultEnum {

    //通用状态码
    E_401(401, "资源禁止访问！"),
    E_403(403, "资源无权访问！"),
    E_500(500, "系统发生异常！"),

    // 自定义状态码
    SUC( 10000, "请求成功！"),
    ERR(-10000, "请求失败！");

    private final Integer   code;

    private final String message;

    ResultEnum(final Integer code, final String message) {
        this.code = code;
        this.message = message;
    }

}
